<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/view/common/tag.jsp" %>
<div class="fly-header" style="background: #b556c7">
    <div class="layui-container">
        <a class="fly-logo" href="${baseurl}/portal/indexNew" style="margin-left: 33%;">
            聊天机器人展览系统
        </a>

        <ul class="layui-nav fly-nav-user">
            <c:if test="${ sessionScope.loginUser==null }">
                <!-- 未登入的状态 -->
                <li class="layui-nav-item">
                    <a class="iconfont icon-touxiang layui-hide-xs" href="${baseurl}/portal/login"></a>
                </li>
                <li class="layui-nav-item">
                    <a href="${baseurl}/portal/login">登入</a>
                </li>
                <li class="layui-nav-item">
                    <a href="${baseurl}/portal/register">注册</a>
                </li>
            </c:if>

            <!-- 登入后的状态 -->
<c:if test="${ sessionScope.loginUser!=null }">
            <li class="layui-nav-item">
              <a class="fly-nav-avatar" href="javascript:;">
                <cite class="layui-hide-xs">欢迎 ${loginUser.userName } 登录</cite>
              </a>
              <dl class="layui-nav-child">
                <dd><a href="${baseurl}/user/personalCenter"><i class="layui-icon">&#xe620;</i>基本设置</a></dd>
                <hr style="margin: 5px 0;">
                <dd><a href="${baseurl}/user/logout" style="text-align: center;">退出</a></dd>
              </dl>
            </li>
</c:if>
        </ul>
    </div>
</div>

